local skel = fk.CreateSkill {
  name = "emo__guangguang",
  tags = {Skill.Compulsory},
}

-- 神人技能，死亡也发动
skel:addEffect(fk.TurnEnd, {
  can_trigger = function (self, event, target, player, data)
    return player:hasSkill(skel.name, true, true) and type(player.tag[skel.name]) == "number" and player.tag[skel.name] % 2 == 0
  end,
  on_use = function (self, event, target, player, data)
    player.room:recover { num = 1, skillName = skel.name, who = player, recoverBy = player }
    player:drawCards(2, skel.name)
    player.room:delay(200)
    --player:chat(string.format("$%s:%d", skel.name, 1))
  end,
})

skel:addEffect(fk.TurnEnd, {
  can_refresh = function (self, event, target, player, data)
    return player:hasSkill(skel.name, true, true)
  end,
  on_refresh = function (self, event, target, player, data)
    player.tag[skel.name] = (player.tag[skel.name] or 0) + 1
  end,
})


Fk:loadTranslationTable{
  ["emo__guangguang"] = "光！",
  [":emo__guangguang"] = "锁定技，每两个回合结束时，你回复一点体力并摸两张牌。",

  ["$emo__guangguang1"] = "要有光！",
  ["$emo__guangguang2"] = "要有光！",
}

return skel
